
 /**
 * QueryDetailAction.java.java.
 * User: BrianChen Date: 2012-7-6 下午04:03:04
 *
 * Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
 * All rights reserved.
 */
package com.collapsar.snail.user.action;

import com.collapsar.core.action.BaseStrutsAction;
import com.collapsar.core.security.model.UserInfo;
import com.collapsar.core.security.service.IUserManager;

/**
 * <pre>
 * REVISIONS: 
 * Version 	Date 		Author 			Description
 * ------------------------------------------------------------------- 
 * 1.0 		2012-7-6 	BrianChen 	1. Created this class. 
 * </pre>
 * 
 * @author BrianChen
 * @date 2012-7-6 下午04:03:04
 * @version 1.0
 * @see
 * 
 */
@SuppressWarnings("serial")
public class QueryDetailAction extends BaseStrutsAction{
	private IUserManager userManager = null;
	private UserInfo userInfo = null;

	
	@Override
	public String execute() throws Exception {
		String userAccount = this.request.getParameter("userAccount");
		String actionStr = this.request.getParameter("action");
		logger.info("###userAccount="+userAccount +", actionStr="+actionStr);
		//Long userInfoId = Long.parseLong(userInfoIdStr);
		//this.userInfo = this.userManager.queryUserInfo(userInfoId);
		this.userInfo = this.userManager.queryUserInfoByUserAccount(userAccount);
		logger.info("####userInfo="+this.userInfo);
		if(this.userInfo != null){
			if(actionStr == null){
				return "user_detail_view";
			}else{
				return "user_update";
			}
		}else{
			return null;
		}
	}

	
	

	public IUserManager getUserManager() {
		return userManager;
	}

	public void setUserManager(IUserManager userManager) {
		this.userManager = userManager;
	}

	public UserInfo getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}
	

}

